﻿namespace SharePoint.Security.ConfigAnalyzer.Engine.Common
{
    using log4net;

    /// <summary>
    /// Type to log messages using log4net API
    /// </summary>
    public static class Logger
    {
        /// <summary>
        /// Get current logger as with settings defined in configuration file
        /// </summary>
        private static ILog log = LogManager.GetLogger(string.Empty);

        /// <summary>
        /// Initializes static members of the <see cref="Logger"/> class.
        /// </summary>
        static Logger()
        {
            log4net.Config.XmlConfigurator.Configure();
        }

        /// <summary>
        /// Gets current logger with the settings defined in configuration file
        /// </summary>
        public static ILog Log
        {
            get
            {
                return log;
            }
        }
    }
}
